package model;

/**
 * Refuge, a field that deposits a bonus.
 * @author Group 20
 */

public class Refuge extends Field
{

	final private int BONUS;
	
	/**
	 * Constructor
	 * @param number: Field number
	 * @param name: Field name
	 * @param description: Field description
	 * @param bonus: value for bonus
	 */
	public Refuge(int number, String name, String description, int bonus) 
	{
		super(number, name, description);
		this.BONUS = bonus;
	}

	/**
	 * Returns that the player has enough money to land on the field.
	 */
	@Override
	public boolean landOnField(Player player, int dicesSum, int numOfFieldTypeOwned) 
	{
		player.deposit(BONUS);
		return true;
		
	}

	/**
	 * toString Method
	 */
	@Override
	public String toString() {
		return super.toString() + "Refuge [bonus=" + BONUS + "].";
	}

	/**
	 * returns the payment
	 */
	@Override
	public int getPayment() 
	{
		return BONUS;
	}

	
	

}
